package com.briup.app01.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.briup.app01.bean.Customer;
import com.briup.app01.dao.CustomerMapper;
import com.briup.app01.service.CustomerService;

//生成service的实现类对象
//并且把生成的对象放到容器中
@Service
public class CustomerServiceImpl implements CustomerService{
	//从容器中获取对象
	@Autowired
	private CustomerMapper custMapper;
	
	public void save(Customer customer) {
		custMapper.save(customer);
	}

	public void deleteById(int id) {
		custMapper.deleteById(id);
	}

	public void update(Customer customer) {
		custMapper.update(customer);
	}

	public Customer selectById(int id) {
		
		return custMapper.selectById(id);
	}

	public List<Customer> selectAll() {
		return custMapper.selectAll();
	}

}
